<template>
	<view>
		<!--问答列表-->
		<block data-type="template" data-is="tempCommonList" data-attr="postsList:postsList,listAdsuccess:listAdsuccess">
			<block v-for="(item, index) in postsList" :key="index">
				<view class="d-kuan d-shangxia-10">
					<view class="d-waikuang-10 ">
						<view class="d-kuan d-beijing-bai d-yuanjiao-10 d-buhuanhang ">
							<view class="d-neikuang-10">
								<!--头像-->
								<view class="d-gaokuang-40 d-kuanggao-40 d-yuanjiao-40 d-box" >
									<image v-if="item.touxiang" :src="item.touxiang" mode="aspectFill" class="d-img-40 d-yuanjiao-50 d-beijing-hui"></image>
									<image v-else src="/static/assets/images/avatar.png" mode="aspectFill" class="d-img-40 d-yuanjiao-50 d-beijing-hui"></image>
									<image v-if="item.rzs == 1" :src="v" mode="aspectFill" class="d-img-10 d-yuanjiao-50 d-beijing-hui d-box-xia"></image>
								    <view v-if="item.wendadaan && item.wendadaan.leixing ==4" class="d-kuan d-zyouyou-juzhong d-shang-10">
								    	<view class=" d-wenzi-12 d-wenzi-yanse-bai d-beijing-hongse d-yuanjiao-6 d-neikuang-5">中标</view>
								    </view>
								</view>
								
							</view>
							<view class="d-kuan d-neikuang-10 d-beijing-hui-f6 d-yuanjiao-10">
								<view class="d-kuan ">
									<view class="d-wenzi-14 d-jiacu">{{item.mingcheng}}</view>
									<view class="d-wenzi-14 d-wenzi-yanse-hui">{{item.yonghuzu}}. {{item.guishudi}}</view>
								</view>
								
								<!--答案内容-->
				
								<view v-if="item.daanshenhe == 1 || uid == tieziindex.uid || adminuid == 1" class=" d-wenzi-16 d-wenzi-huanhang d-shang-5" @click="daantiezi(item.id)">
									{{item.neirong}}...
								</view>
								<view v-if="item.daanshenhe != 1">
									<view class="d-kuan d-zyouyou-juzhong d-shang-10">
										<view class="d-bian-1 d-yuanjiao-50 d-neikuang-5 d-buhuanhang" @click="daantiezi(item.id)">
											<view class="d-zuo-10 d-you-10 d-wenzi-12">待审核...</view>
										</view>
									</view>
								</view>
								<view v-if="item.daanshenhe == 1">
									<view v-if="item.wendadaan && item.wendadaan.shifouzhongbiaouid !=1">
										<view v-if=" uid == tieziindex.uid || adminuid == 1" class="d-kuan d-shang-10">
											<u-row customStyle="margin-bottom: 10px" gutter="10">
												<u-col span="3">
													<view class="d-neirong-juzhong d-bian-1 d-yuanjiao-10 d-neikuang-5 d-wenzi-12 d-wenzi-yanse-hongse" @click="getWendajianglidata(1,tieids,item.uid)">
														鼓励积分
													</view>
												</u-col>
												<u-col span="3">
													<view class="d-neirong-juzhong d-bian-1 d-yuanjiao-10 d-neikuang-5 d-wenzi-12 d-wenzi-yanse-hongse" @click="getWendajianglidata(2,tieids,item.uid)">
														鼓励0.1
													</view>
												</u-col>
												<u-col span="3">
													<view class="d-neirong-juzhong d-bian-1 d-yuanjiao-10 d-neikuang-5 d-wenzi-12 d-wenzi-yanse-hongse"  @click="getWendajianglidata(3,tieids,item.uid)">
														感谢参与
													</view>
												</u-col>
												<u-col span="3">
													<view class="d-neirong-juzhong d-bian-1 d-yuanjiao-10 d-neikuang-5 d-wenzi-12 d-wenzi-yanse-hongse"  @click="getWendajianglidata(4,tieids,item.uid)">
														选择中标
													</view>
												</u-col>
											</u-row>
										</view>
									</view>
									<view v-else>
										<view v-if="item.wendadaan && item.wendadaan.leixing ==1" class="d-kuan d-zyouyou-juzhong d-shang-10">
											<view class="d-bian-1 d-yuanjiao-50 d-neikuang-5 d-buhuanhang">
												<view class="d-zuo-10 d-you-10 d-wenzi-12">鼓励 1 积分</view>
											</view>
										</view>
										<view v-else-if="item.wendadaan && item.wendadaan.leixing ==2" class="d-kuan d-zyouyou-juzhong d-shang-10">
											<view class="d-bian-1 d-yuanjiao-50 d-neikuang-5 d-buhuanhang">
												<view class="d-zuo-10 d-you-10 d-wenzi-12">鼓励 0.1 元</view>
											</view>
										</view>
										<view v-else-if="item.wendadaan && item.wendadaan.leixing ==3" class="d-kuan d-zyouyou-juzhong d-shang-10">
											<view class="d-bian-1 d-yuanjiao-50 d-neikuang-5 d-buhuanhang">
												<view class="d-zuo-10 d-you-10 d-wenzi-12">感谢参与</view>
											</view>
										</view>
										<view v-else-if="item.wendadaan && item.wendadaan.leixing ==4" class="d-kuan d-zyouyou-juzhong d-shang-10">
											<view class="d-bian-1 d-yuanjiao-50 d-neikuang-5 d-buhuanhang">
												<view class="d-zuo-10 d-you-10 d-wenzi-12 d-wenzi-yanse-hongse">已经中标</view>
											</view>
										</view>
									</view>
								</view>

								
								<!--帖子内容图片-->
								<view class="d-fu-kuan-10" @click="tiezi(item.cid,item.id)">
									<block v-for="(itemtu, indextu) in item.tuji" :key="indextu">
										<view class="d-kuan-30 d-zuo d-liangbian-10" v-if="indextu < 8">
											<image :src="itemtu" mode="aspectFill" class="d-img-100-bai d-yuanjiao-6 d-yinying-10"></image>
										</view>
										
									</block>
									
									<view class="d-clear"></view>
								</view>
								<!--帖子九格图片-->
								<view class="d-fu-kuan-10" @click="tiezi(item.cid,item.id)">
									<block v-for="(itemtu, indextu) in item.jiugetu" :key="indextu">
										<view class="d-kuan-30 d-zuo d-liangbian-10" v-if="indextu < 8">
											<image :src="itemtu" mode="aspectFill" class="d-img-100-bai d-yuanjiao-6 d-yinying-10"></image>
										</view>
									</block>
									<view class="d-clear"></view>
								</view>
								
								<view class="d-clear"></view>
		
							</view>
						</view>
		
					</view>
				</view>
			</block>
		</block>
		<!--u-loading-icon text="加载中..." textSize="18" :show="xialajiazai" ></u-loading-icon>
		<view :style="'display:' + (isLoading?'block':'none')">
			<template is="tempLoading"></template>
		</view>
		<view class="loadingmore" :style="'display:' + floatDisplay">
			<view class="no-more" :hidden="!isLastPage">- 无更多文章 -</view>
		</view>
		<u-divider text="已经到底啦 !" v-if="daodi">{{daodi}}</u-divider>
		
		<view class="copyright" :style="'display:' + floatDisplay">
			<block data-type="template" data-is="tempCopyright" data-attr="webSiteName:webSiteName,domain:domain">
				<view> {{webSiteName}} </view>
				<view> {{banbenhao}} </view>
			</block>
		</view-->
	</view>
	
	
</template>

<script>
	import config from "../../utils/config";
	export default{
		props:{
			aid: {
				type: [String, Number],
				default: ''
			},
			uid:{
				type: [String, Number],
				default: ''
			},
			adminuid:{
				type: [String, Number],
				default: ''
			},
			tieids:{
				type: [String, Number],
				default: ''
			},
			//答案
			postsList:{
				type: [Array,Object],
				default() {
				  return {};
				}
			},
			wendadata:{
				type: [Array,Object],
				default() {
				  return {};
				}
			},
			tieziindex:{
				type: [Array,Object],
				default() {
				  return {};
				}
			}
		},
		data(){
			return {
				
			}
		},
		
		methods:{
			//帖子
			tiezi(cid,id) {
				//console.log('id',cid);
				this.$emit('tiezi', cid,id);
			},
			//3,tieids,item.uid
			getWendajianglidata(id,tieids,itemuid){
				this.$emit('getWendajianglidata', id,tieids,itemuid);
			},
			getdaan(tieids,uid){
				this.$emit('getdaan', tieids,uid);
			},
			daantiezi(tieids){
				this.$emit('daantiezi', tieids);
			}
			
		}
	}
</script>

<style lang="scss" scoped>
	
</style>
